<!DOCTYPE html>
<script src="../include.js"></script>
<div popover id="pop"></div>
<div popover id="pop2"></div>
<script>
    test(() => {
        const pop = document.getElementById("pop");
        pop.showPopover();
        pop.hidePopover();
        pop.showPopover();
        println("Didn't crash when showing recently hidden popover");
        pop.remove();
        println("Didn't crash when removing visible popover");
        const pop2 = document.getElementById("pop2");
        pop2.showPopover();
        pop2.popover = undefined;
        pop2.remove();
        println("Didn't crash when removing popover with changed attribute");
    });
</script>
